package com.inno.subject.infra.basic.service;

import com.github.pagehelper.Page;
import com.inno.subject.infra.basic.entity.PlannerSubjectRecords;
import com.inno.subject.infra.entity.RankCountBO;

import java.util.List;

/**
 * (PlannerSubjectRecords)表服务接口
 *
 * @author makejava
 * @since 2024-11-16 20:57:05
 */
public interface PlannerSubjectRecordsService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    PlannerSubjectRecords queryById(Long id);

    long count(PlannerSubjectRecords plannerSubjectRecords);

    /**
     * 新增数据
     *
     * @param plannerSubjectRecords 实例对象
     * @return 实例对象
     */
    PlannerSubjectRecords insert(PlannerSubjectRecords plannerSubjectRecords);

    /**
     * 修改数据
     *
     * @param plannerSubjectRecords 实例对象
     * @return 实例对象
     */
    PlannerSubjectRecords update(PlannerSubjectRecords plannerSubjectRecords);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Long id);

    void insertBatch(List<PlannerSubjectRecords> recordsList);


    List<RankCountBO> queryTotalCountGroupUserId();

    List<PlannerSubjectRecords> queryByUserIdAndSubjectIdList(Long currentUser, List<Long> subjectIdList);

    Page<PlannerSubjectRecords> queryPage(PlannerSubjectRecords plannerSubjectRecords);

    Page<PlannerSubjectRecords> queryErrorSubjectId(PlannerSubjectRecords records);

    List<Long> queryCountGroupSubjectId(Long currentUser);

    void deleteBatch(List<Long> needDeleteList);
}
